#coding=utf-8
#Boa:FramePanel:PanelHomePage

import wx

[wxID_PANELHOMEPAGE, wxID_PANELHOMEPAGEBTNACCOUNT, 
 wxID_PANELHOMEPAGEBTNCHECKDATA, wxID_PANELHOMEPAGEBTNCOLLECT, 
 wxID_PANELHOMEPAGEBTNCUSTOMER, wxID_PANELHOMEPAGEBTNDELIVERYPLAN, 
 wxID_PANELHOMEPAGEBTNEVENT, wxID_PANELHOMEPAGEBTNEXPENSE, 
 wxID_PANELHOMEPAGEBTNPEER, wxID_PANELHOMEPAGEBTNPEERLEND, 
 wxID_PANELHOMEPAGEBTNPRODUCT, wxID_PANELHOMEPAGEBTNPURORDER, 
 wxID_PANELHOMEPAGEBTNPURQUERY, wxID_PANELHOMEPAGEBTNRECORD, 
 wxID_PANELHOMEPAGEBTNREPORT, wxID_PANELHOMEPAGEBTNSALEORDER, 
 wxID_PANELHOMEPAGEBTNSALEQUERY, wxID_PANELHOMEPAGEBTNSUPPLIER, 
 wxID_PANELHOMEPAGEBTNTODAY, wxID_PANELHOMEPAGESTATICBOX1, 
 wxID_PANELHOMEPAGESTATICBOX2, wxID_PANELHOMEPAGESTATICBOX3, 
 wxID_PANELHOMEPAGESTATICBOX4, wxID_PANELHOMEPAGESTATICBOX5, 
 wxID_PANELHOMEPAGESTATICBOX6, wxID_PANELHOMEPAGESTATICBOX7, 
 wxID_PANELHOMEPAGESTATICBOX8, wxID_PANELHOMEPAGESTATICBOX9, 
] = [wx.NewId() for _init_ctrls in range(28)]

class PanelHomePage(wx.Panel):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Panel.__init__(self, id=wxID_PANELHOMEPAGE, name=u'PanelHomePage',
              parent=prnt, pos=wx.Point(77, 39), size=wx.Size(1169, 709),
              style=wx.TAB_TRAVERSAL)
        self.SetClientSize(wx.Size(1161, 675))
        self.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, False,
              u'\u6977\u4f53_GB2312'))
        self.SetBackgroundColour(wx.Colour(183, 209, 173))

        self.btnSaleOrder = wx.Button(id=wxID_PANELHOMEPAGEBTNSALEORDER,
              label=u'\u9500\u552e\u8ba2\u5355', name=u'btnSaleOrder',
              parent=self, pos=wx.Point(96, 56), size=wx.Size(93, 26), style=0)
        self.btnSaleOrder.Bind(wx.EVT_BUTTON, self.OnBtnSaleOrderButton,
              id=wxID_PANELHOMEPAGEBTNSALEORDER)

        self.btnSaleQuery = wx.Button(id=wxID_PANELHOMEPAGEBTNSALEQUERY,
              label=u'\u9500\u552e\u67e5\u8be2', name=u'btnSaleQuery',
              parent=self, pos=wx.Point(96, 96), size=wx.Size(93, 26), style=0)
        self.btnSaleQuery.Bind(wx.EVT_BUTTON, self.OnBtnSaleQueryButton,
              id=wxID_PANELHOMEPAGEBTNSALEQUERY)

        self.btnCollect = wx.Button(id=wxID_PANELHOMEPAGEBTNCOLLECT,
              label=u'\u9500\u552e\u4ed8\u6b3e', name=u'btnCollect',
              parent=self, pos=wx.Point(96, 136), size=wx.Size(93, 26),
              style=0)
        self.btnCollect.Bind(wx.EVT_BUTTON, self.OnBtnCollectButton,
              id=wxID_PANELHOMEPAGEBTNCOLLECT)

        self.btnPurOrder = wx.Button(id=wxID_PANELHOMEPAGEBTNPURORDER,
              label=u'\u91c7\u8d2d\u5355', name=u'btnPurOrder', parent=self,
              pos=wx.Point(320, 56), size=wx.Size(93, 26), style=0)
        self.btnPurOrder.Bind(wx.EVT_BUTTON, self.OnBtnPurOrderButton,
              id=wxID_PANELHOMEPAGEBTNPURORDER)

        self.btnPurQuery = wx.Button(id=wxID_PANELHOMEPAGEBTNPURQUERY,
              label=u'\u91c7\u8d2d\u67e5\u8be2', name=u'btnPurQuery',
              parent=self, pos=wx.Point(320, 96), size=wx.Size(93, 26),
              style=0)
        self.btnPurQuery.Bind(wx.EVT_BUTTON, self.OnBtnPurQueryButton,
              id=wxID_PANELHOMEPAGEBTNPURQUERY)

        self.btnPeerLend = wx.Button(id=wxID_PANELHOMEPAGEBTNPEERLEND,
              label=u'\u540c\u884c\u62c6\u501f', name=u'btnPeerLend',
              parent=self, pos=wx.Point(520, 56), size=wx.Size(93, 26),
              style=0)
        self.btnPeerLend.Bind(wx.EVT_BUTTON, self.OnBtnPeerLendButton,
              id=wxID_PANELHOMEPAGEBTNPEERLEND)

        self.btnCustomer = wx.Button(id=wxID_PANELHOMEPAGEBTNCUSTOMER,
              label=u'\u5ba2\u6237\u4fe1\u606f', name=u'btnCustomer',
              parent=self, pos=wx.Point(96, 248), size=wx.Size(93, 26),
              style=0)
        self.btnCustomer.Bind(wx.EVT_BUTTON, self.OnBtnCustomerButton,
              id=wxID_PANELHOMEPAGEBTNCUSTOMER)

        self.btnSupplier = wx.Button(id=wxID_PANELHOMEPAGEBTNSUPPLIER,
              label=u'\u4f9b\u5e94\u5546\u4fe1\u606f', name=u'btnSupplier',
              parent=self, pos=wx.Point(96, 288), size=wx.Size(93, 26),
              style=0)
        self.btnSupplier.Bind(wx.EVT_BUTTON, self.OnBtnSupplierButton,
              id=wxID_PANELHOMEPAGEBTNSUPPLIER)

        self.btnPeer = wx.Button(id=wxID_PANELHOMEPAGEBTNPEER,
              label=u'\u540c\u884c\u4fe1\u606f', name=u'btnPeer', parent=self,
              pos=wx.Point(96, 328), size=wx.Size(93, 26), style=0)
        self.btnPeer.Bind(wx.EVT_BUTTON, self.OnBtnPeerButton,
              id=wxID_PANELHOMEPAGEBTNPEER)

        self.btnEvent = wx.Button(id=wxID_PANELHOMEPAGEBTNEVENT,
              label=u'\u5b9a\u65f6\u63d0\u9192', name=u'btnEvent', parent=self,
              pos=wx.Point(704, 56), size=wx.Size(93, 26), style=0)
        self.btnEvent.Bind(wx.EVT_BUTTON, self.OnBtnEventButton,
              id=wxID_PANELHOMEPAGEBTNEVENT)

        self.btnRecord = wx.Button(id=wxID_PANELHOMEPAGEBTNRECORD,
              label=u'\u5de5\u4f5c\u8bb0\u5f55', name=u'btnRecord', parent=self,
              pos=wx.Point(704, 96), size=wx.Size(93, 26), style=0)
        self.btnRecord.Bind(wx.EVT_BUTTON, self.OnBtnRecordButton,
              id=wxID_PANELHOMEPAGEBTNRECORD)

        self.staticBox1 = wx.StaticBox(id=wxID_PANELHOMEPAGESTATICBOX1,
              label=u'', name='staticBox1', parent=self, pos=wx.Point(72, 40),
              size=wx.Size(144, 140), style=0)

        self.btnProduct = wx.Button(id=wxID_PANELHOMEPAGEBTNPRODUCT,
              label=u'\u5546\u54c1\u4fe1\u606f', name=u'btnProduct',
              parent=self, pos=wx.Point(320, 248), size=wx.Size(93, 26),
              style=0)
        self.btnProduct.Bind(wx.EVT_BUTTON, self.OnBtnProductButton,
              id=wxID_PANELHOMEPAGEBTNPRODUCT)

        self.btnAccount = wx.Button(id=wxID_PANELHOMEPAGEBTNACCOUNT,
              label=u'\u8d44\u91d1\u8d26\u6237', name=u'btnAccount',
              parent=self, pos=wx.Point(520, 248), size=wx.Size(93, 26),
              style=0)
        self.btnAccount.Bind(wx.EVT_BUTTON, self.OnBtnAccountButton,
              id=wxID_PANELHOMEPAGEBTNACCOUNT)

        self.staticBox2 = wx.StaticBox(id=wxID_PANELHOMEPAGESTATICBOX2,
              label=u'', name='staticBox2', parent=self, pos=wx.Point(296, 40),
              size=wx.Size(144, 144), style=0)
        self.staticBox2.SetBackgroundColour(wx.Colour(0, 0, 0))

        self.staticBox3 = wx.StaticBox(id=wxID_PANELHOMEPAGESTATICBOX3,
              label=u'', name='staticBox3', parent=self, pos=wx.Point(496, 40),
              size=wx.Size(144, 144), style=0)

        self.staticBox4 = wx.StaticBox(id=wxID_PANELHOMEPAGESTATICBOX4,
              label=u'', name='staticBox4', parent=self, pos=wx.Point(680, 40),
              size=wx.Size(144, 144), style=0)

        self.staticBox5 = wx.StaticBox(id=wxID_PANELHOMEPAGESTATICBOX5,
              label=u'', name='staticBox5', parent=self, pos=wx.Point(72, 224),
              size=wx.Size(144, 152), style=0)

        self.staticBox6 = wx.StaticBox(id=wxID_PANELHOMEPAGESTATICBOX6,
              label=u'', name='staticBox6', parent=self, pos=wx.Point(296, 224),
              size=wx.Size(144, 152), style=0)

        self.staticBox7 = wx.StaticBox(id=wxID_PANELHOMEPAGESTATICBOX7,
              label=u'', name='staticBox7', parent=self, pos=wx.Point(680, 224),
              size=wx.Size(144, 152), style=0)

        self.btnDeliveryPlan = wx.Button(id=wxID_PANELHOMEPAGEBTNDELIVERYPLAN,
              label=u'\u76f4\u9001\u8ba1\u5212', name=u'btnDeliveryPlan',
              parent=self, pos=wx.Point(704, 248), size=wx.Size(93, 26),
              style=0)
        self.btnDeliveryPlan.Bind(wx.EVT_BUTTON, self.OnBtnDeliveryPlanButton,
              id=wxID_PANELHOMEPAGEBTNDELIVERYPLAN)

        self.btnExpense = wx.Button(id=wxID_PANELHOMEPAGEBTNEXPENSE,
              label=u'\u8d39\u7528\u652f\u51fa', name=u'btnExpense',
              parent=self, pos=wx.Point(520, 288), size=wx.Size(93, 26),
              style=0)
        self.btnExpense.Bind(wx.EVT_BUTTON, self.OnBtnExpenseButton,
              id=wxID_PANELHOMEPAGEBTNEXPENSE)

        self.staticBox8 = wx.StaticBox(id=wxID_PANELHOMEPAGESTATICBOX8,
              label=u'', name='staticBox8', parent=self, pos=wx.Point(496, 224),
              size=wx.Size(144, 152), style=0)

        self.staticBox9 = wx.StaticBox(id=wxID_PANELHOMEPAGESTATICBOX9,
              label=u'', name='staticBox9', parent=self, pos=wx.Point(72, 424),
              size=wx.Size(144, 152), style=0)

        self.btnCheckData = wx.Button(id=wxID_PANELHOMEPAGEBTNCHECKDATA,
              label=u'\u6570\u636e\u6821\u5bf9', name=u'btnCheckData',
              parent=self, pos=wx.Point(96, 456), size=wx.Size(93, 26),
              style=0)
        self.btnCheckData.Bind(wx.EVT_BUTTON, self.OnBtnCheckDataButton,
              id=wxID_PANELHOMEPAGEBTNCHECKDATA)

        self.btnToday = wx.Button(id=wxID_PANELHOMEPAGEBTNTODAY,
              label=u'\u4eca\u65e5\u5355\u636e', name=u'btnToday', parent=self,
              pos=wx.Point(320, 288), size=wx.Size(93, 26), style=0)
        self.btnToday.Bind(wx.EVT_BUTTON, self.OnBtnTodayButton,
              id=wxID_PANELHOMEPAGEBTNTODAY)

        self.btnReport = wx.Button(id=wxID_PANELHOMEPAGEBTNREPORT,
              label=u'\u7edf\u8ba1\u62a5\u8868', name=u'btnReport', parent=self,
              pos=wx.Point(520, 328), size=wx.Size(93, 26), style=0)
        self.btnReport.Bind(wx.EVT_BUTTON, self.OnBtnReportButton,
              id=wxID_PANELHOMEPAGEBTNREPORT)

    def __init__(self, parent):
        self._init_ctrls(parent)
        
        self.main = self.GetParent().GetParent()

    def OnBtnSaleOrderButton(self, event):
        self.main.newSaleOrder()

    def OnBtnSaleQueryButton(self, event):
        self.main.showSaleHistory()

    def OnBtnCollectButton(self, event):
        self.main.newCollect()

    def OnBtnPurOrderButton(self, event):
        self.main.newPurOrder()

    def OnBtnPurQueryButton(self, event):
        self.main.showPurHistory()

    def OnBtnPeerLendButton(self, event):
        self.main.newLend()

    def OnBtnCustomerButton(self, event):
        self.main.showCustomer()

    def OnBtnSupplierButton(self, event):
        self.main.showSupplier()

    def OnBtnPeerButton(self, event):
        self.main.showPeer()

    def OnBtnEventButton(self, event):
        self.main.showEvent()

    def OnBtnRecordButton(self, event):
        self.main.showRecord()

    def OnBtnProductButton(self, event):
        self.main.showProduct()

    def OnBtnAccountButton(self, event):
        self.main.showAccountDetail()

    def OnBtnFundCustomerButton(self, event):
        self.main.showFundCustomer()

    def OnBtnFundSupplierButton(self, event):
        self.main.showFundSupplier()

    def OnBtnDeliveryPlanButton(self, event):
        self.main.newDeliveryPlan()

    def OnBtnExpenseButton(self, event):
        
        self.main.showExpense()

    def OnBtnCheckDataButton(self, event):
        self.main.showValidation()

    def OnBtnReportButton(self, event):
        self.main.showReport()

    def OnBtnTodayButton(self, event):
        self.main.showReportToday()
        
        
